{% extends "../main.html" %}
{% block head_js %}
<link href="{{static_url('datatable/jquery.dataTables.css')}}"  rel="stylesheet">
<!--link href="http://cdn.datatables.net/1.10.0/css/jquery.dataTables.css" rel="stylesheet"-->
<style type="text/css">
#red {color: red;}
#blue {color: blue;}
#orange {color: orange;}
#green {color: green;}
a {color: inherit;}
</style>
{% end %}

{% block bodyy %}
<h3 class="sub-header" content="">监控列表</h3>
<form action="" method="post">
    <table id="hosts" class="table table-striped">
        <thead>
        <tr>
          <th>IP地址</th>
            <!--<th>端口</th>-->
            <th>巡检结果</th>
        </tr>
      </thead>
      <tbody>
       {% for i in res %}
       <tr class="{{i[2]}}">
           <td>{{i[0]}}</td>
           <!--<td>{{i[1]}}</td>-->
           <td>{{i[2]}}</td>
        </tr>
       {% end %}
    </tbody>
     </table>
        <div class="col-sm-offset-5 col-sm-10">
        <button type="submit" name="cmd" value="check" class="btn btn-primary">一键巡检</button>
    </div>
</form>


{% end %}
{% block body_js %}
<script src="{{ static_url('datatable/jquery.dataTables.min.js') }}"></script>
<script type="text/javascript">
    $(document).ready(function () {
        $('#hosts').dataTable({
            "language": {
                "url": "{{ static_url('datatable/Chinese.json') }}"
            }
        });
    });
</script>
{% end %}